﻿#region Usings
using BK.Model;
using BK.Repositories.Abstract;
#endregion

namespace BK.BlusinessLogic
{
    public class FinancistoFilesBl : IExpensesFilesBl<FinancistoExpense, FinancistoFile>
    {
        #region Readonly & Static Fields
        private readonly IExpensesFilesRepository<FinancistoExpense, FinancistoFile> _financistoFilesRepository;
        #endregion

        #region C'tors
        public FinancistoFilesBl(IExpensesFilesRepository<FinancistoExpense, FinancistoFile> financistoFilesRepository)
        {
            _financistoFilesRepository = financistoFilesRepository;
        }
        #endregion

        #region IExpensesFilesBl<FinancistoExpense,FinancistoFile> Members
        public void AddExpense(FinancistoFile expensesFile, FinancistoExpense expense)
        {
            expensesFile.Expenses.Add(expense);
        }

        public ImportedFile GetAnotherByExpense(FinancistoExpense expense)
        {
            return _financistoFilesRepository.GetAnotherByExpense(expense);
        }
        #endregion
    }
}